﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SelectMaintDispatch.aspx.cs" Inherits="Services_MaintDispatch" %>
<%@ Register Src="../usercontrol/PageNavigator.ascx" TagName="PageNavigator" TagPrefix="uc1" %>
<html>
<head id="Head1" runat="server">
    <title>无标题页</title>
    <link href="../css/adminCss.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../js/changerows.js"></script>
    <script type="text/javascript" src="../js/rl.js"></script>
    <script type="text/javascript">
    function CheckAll(form) {
	    for (var i=0;i<form.elements.length;i++) {
		    var e = form.elements[i];
		    if (e.name != 'chkall' && e.type=='checkbox')
			    e.checked = form.chkall.checked;
	    }
    }
    
    function PrintData(id)
    {
        if(id!="")
        {
            window.open("DrawPrint.aspx?id="+id,"","width=800px,height=650px,left=100px,top=30px,scrollbars=yes");
            return false;
        }
        return false;
    }
    </script>

</head>
<body>
    <form id="form1" runat="server">
                <table width="99%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td  height="22">
                    <img src="../images/module.gif" width="20" height="22" alt="" />
                    <asp:Label ID="lblPath" runat="server"></asp:Label></td>
                    </tr>

            <tr>
                <td align="right">
                    <img src="../images/search.gif" alt="搜索" width="16" height="16" />
                     保修日期：<asp:TextBox ID="txtKdate" runat="server" CssClass="input1"  MaxLength="10" Width="70px"></asp:TextBox>至<asp:TextBox ID="txtJdate" runat="server" CssClass="input1" Width="70px"  MaxLength="10"></asp:TextBox>客户名称：<asp:TextBox ID="txtGuest" runat="server" CssClass="input1" Width="70px" ></asp:TextBox>联系电话：<asp:TextBox
                            ID="txttel" runat="server" CssClass="input1" Width="70px" ></asp:TextBox>型号：<asp:TextBox
                            ID="txtmol" runat="server" CssClass="input1" Width="70px" ></asp:TextBox>型号编号：<asp:TextBox ID="txtSalesCode" runat="server" Width="70px" CssClass="input1" ></asp:TextBox>
                    <asp:Button ID="btnSearch" runat="server" Text="搜索" CssClass="submit" OnClick="btnSearch_Click" />
                </td>
            </tr>
        </table>
        <table width="99%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td bgcolor="#3CB6E5" height="5px">
                </td>
            </tr>
        </table>
        <asp:GridView ID="GvData" runat="server" Width="99%" AutoGenerateColumns="False"
            CssClass="gridview"  EmptyDataText="没有数据">
             <RowStyle Height="25px" />
            <PagerSettings Visible="False" />
            <Columns>
                <asp:BoundField HeaderText="ID" DataField="Maintaddid">
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="客户名称" DataField="Guestname">
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="联系人" DataField="Guestmen">
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="联系电话" DataField="Guesttel">
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="客户地址" DataField="Guestaddress">
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="型号编号" DataField="SalesCode">
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="品牌" DataField="comidband">
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="商品名称" DataField="cominame">
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="型号" DataField="comidSpe">
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="单位" DataField="comidunit">
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="维修日期" DataField="Date">
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                  <asp:BoundField HeaderText="维修部件" DataField="maintdelt">
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="维修人" DataField="StaffName">
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="操作">
                    <ItemTemplate>
                         <asp:LinkButton ID="linkedit" CommandArgument='<%#Eval("Maintaddid") %>' runat="server"
                            ForeColor="Red" OnClick="linkedit_Click">修改</asp:LinkButton>
                            <asp:LinkButton ID="linkPrint" CommandArgument='<%#Eval("Maintaddid") %>' runat="server"
                            ForeColor="Red" OnClick="linkPrint_Click">打印</asp:LinkButton>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
               <asp:TemplateField HeaderText="选择"><ItemTemplate>               
                    <asp:CheckBox ID="chkDelete"  runat="server" />
                </ItemTemplate>
                    <ItemStyle Width="40px" />
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField> 
            </Columns>
            <EmptyDataRowStyle ForeColor="Red" HorizontalAlign="Center" />
            
        </asp:GridView>
        <table align="center" width="99%">
            <tr>
                <td>
                    <uc1:PageNavigator ID="PageNavigator1" ConnectionString="connstr" DataId="GvData"
                        ShowType="Text" PageSize="20" runat="server" />
                </td>
                <td style="text-align: right;"><input type="checkbox" name="chkall"  onclick="CheckAll(this.form)" value="on"/><font color="#FF0000">全选</font>&nbsp;
                    <asp:Button ID="btndel" runat="server" Text="删除"  CommandArgument='<%#Eval("Maintaddid") %>' CssClass="submit" OnClick="btndel_Click" /></td>
            </tr>
        </table>
    </form>
</body>
</html>
<script language="javascript"><!--
//senfe("表格名称","奇数行背景","偶数行背景","鼠标经过背景","点击后背景");
senfe("GvData","#ECF9FC","#FFFFFF","#D6F1F8");
--></script>